import { request } from '../request';

const baseUrl = '{{ base_url }}';
// 定时列表查询
export function fetchGet{{ model_name }}List(params: Api.SystemManage.{{ model_name }}SearchParams) {
  return request<Api.SystemManage.{{ model_name }}List>({
    url: `{{'$'}}{baseUrl}/list`,
    method: 'get',
    params
  });
}

// 添加定时任务
export function fetchAdd{{ model_name }}(data: Api.SystemManage.{{ model_name }}Update) {
  return request<App.Service.Response>({
    url: `{{'$'}}{baseUrl}/add`,
    method: 'post',
    data
  });
}

// 更新定时任务
export function fetchUpdate{{ model_name }}(data: Api.SystemManage.{{ model_name }}Update) {
  return request<App.Service.Response>({
    url: `{{'$'}}{baseUrl}/update`,
    method: 'put',
    data
  });
}

// 删除定时任务
export function fetchDelete{{ model_name }}(data: Api.SystemManage.Ids) {
  return request<App.Service.Response>({
    url: `{{'$'}}{baseUrl}/delete`,
    method: 'delete',
    data
  });
}